package com.leizi.igym.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.leizi.igym.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.leizi.igym.dto.DoughnutStatisticsDTO;
import com.leizi.igym.dto.LineStatisticsDTO;
import com.leizi.igym.dto.UserPageQueryDTO;
import com.leizi.igym.vo.UserLoginVO;
import com.leizi.igym.vo.UserVO;

import java.io.IOException;
import java.util.List;

/**
* @author PC
* @description 针对表【t_user(健身房用户表)】的数据库操作Service
* @createDate 2024-04-04 09:07:42
*/
public interface UserService extends IService<User> {
    QueryWrapper<User> getLoginQueryWrapper(String account, String password);

    UserLoginVO userLoginInUser(String username, String password);

    UserLoginVO toUserLoginVO(User user);

    Long registerUser(String username, String password, String checkPassword);

    boolean modifyStatus(Long id, Integer status);

    boolean updatePassword(Long id, String originPassword, String newPassword, String checkPassword);

    UserVO getUserById(Long id);

    QueryWrapper<User> getUserPageQueryWrapper(UserPageQueryDTO dto);

    boolean editByIdInAdmin(User user);

    boolean editByIdInUser(User user);

    boolean updatePasswordInUser(String originPassword, String newPassword, String checkPassword);

    UserLoginVO wxLogin(String code) throws IOException;

    LineStatisticsDTO getLineStatisticsByDate(Integer date);
}
